<template>
    <div>
        <van-tabs class="tabs" v-model="activeName" sticky>
            <van-tab v-for="item in tab_list" :title="item.name" :name="item.path" :key="item.id">
                <list-item :contuan_data="item.path" ></list-item>
            </van-tab>
        </van-tabs>
    </div>
</template>
<script>
import listItem from './components/list-item'
export default {
    name: "index",
    data() {
        return {
            activeName: 'contuan_home',
            tab_list: [
                {path: 'contuan_home', name: '全部商品',id: 0},
                {path: 'contuan_new', name: '上新',id: 1},
            ]
        }
    },

    methods: {
    },
    components: {
        listItem
    },
    mounted() {
        this.$store.commit('hide') // 隐藏底部tabbar
    },
    destroyed () {
        this.$store.commit('show') // 显示底部tabbar
    },
}
</script>
<style scoped>
</style>
